package com.kingdee.eas.custom.bpmworkflow.cbbill.rzht;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractFinaNcingBpmFacadeControllerBean extends AbstractBizControllerBean implements FinaNcingBpmFacadeController
{
    protected AbstractFinaNcingBpmFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("5737405C");
    }

    public void _saveBPMWorkFlow(Context ctx, String billId, String procImstId, String procURL, String success) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("88ebef0a-ca40-4a39-87b3-dcee56ea47af"), new Object[]{ctx, billId, procImstId, procURL, success});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __saveBPMWorkFlow(ctx, billId, procImstId, procURL, success);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __saveBPMWorkFlow(Context ctx, String billId, String procImstId, String procURL, String success) throws BOSException
    {    	
        return;
    }

    public String _startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b25f39ed-5837-43c2-803a-3abfa5dceec6"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__startBPMWorkFlow(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public String _stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("8ad56d59-71f4-4753-833f-4bec25f51ccb"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__stopBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

    public void _updateBillState(Context ctx, int state, String billId, String auditorNum) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e0243845-fcb7-488b-bfeb-e88bcd664ec0"), new Object[]{ctx, new Integer(state), billId, auditorNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __updateBillState(ctx, state, billId, auditorNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __updateBillState(Context ctx, int state, String billId, String auditorNum) throws BOSException
    {    	
        return;
    }

    public String _viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("dbe033b2-e2fb-4d7a-b4d9-8bbe0557d173"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__viewBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

    public String _createBillXML(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("945d4094-e043-4ac6-a3a8-9104d13d173a"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__createBillXML(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __createBillXML(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

}